package com.tulele.vtool.mapper;

import com.tulele.vtool.model.UserShareArticleInfo;
import org.springframework.stereotype.Component;

@Component(value = "userShareArticleInfoMapper")
public interface UserShareArticleInfoMapper {

    /**
     * 添加用户分享文章信息
     * @param userShareArticleInfo
     * @return
     */
    int addUserShareArticleInfo(UserShareArticleInfo userShareArticleInfo);

    /**
     * 更新用户分享文章信息
     * @param userShareArticleInfo
     * @return
     */
    int updUserShareArticleInfo(UserShareArticleInfo userShareArticleInfo);

    /**
     * 删除数据
     *
     * @param userId
     * @param articleId
     * @return 影响行数
     */
    int deleteByUserIdAndArticleId(Integer userId, Integer articleId);

    /**
     * 获取用户的分享数量
     * @param userId
     * @return
     */
    Integer getUserSharedArticleCount(Integer userId);
}